/**
 * Copyright (C) 2011 Andrew C. Love (DNC) <dnc.app.sup@gmail.com>
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.dnc.ibatis.model;

import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class SecUserExample {

    /**
     * This field was generated by Apache iBATIS ibator. This field corresponds to the database table sec_user
     * @ibatorgenerated  Fri May 21 00:34:37 EDT 2010
     */
    protected String orderByClause;
    /**
     * This field was generated by Apache iBATIS ibator. This field corresponds to the database table sec_user
     * @ibatorgenerated  Fri May 21 00:34:37 EDT 2010
     */
    protected List<Criteria> oredCriteria;

    /**
     * This method was generated by Apache iBATIS ibator. This method corresponds to the database table sec_user
     * @ibatorgenerated  Fri May 21 00:34:37 EDT 2010
     */
    public SecUserExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    /**
     * This method was generated by Apache iBATIS ibator. This method corresponds to the database table sec_user
     * @ibatorgenerated  Fri May 21 00:34:37 EDT 2010
     */
    protected SecUserExample(SecUserExample example) {
        this.orderByClause = example.orderByClause;
        this.oredCriteria = example.oredCriteria;
    }

    /**
     * This method was generated by Apache iBATIS ibator. This method corresponds to the database table sec_user
     * @ibatorgenerated  Fri May 21 00:34:37 EDT 2010
     */
    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    /**
     * This method was generated by Apache iBATIS ibator. This method corresponds to the database table sec_user
     * @ibatorgenerated  Fri May 21 00:34:37 EDT 2010
     */
    public String getOrderByClause() {
        return orderByClause;
    }

    /**
     * This method was generated by Apache iBATIS ibator. This method corresponds to the database table sec_user
     * @ibatorgenerated  Fri May 21 00:34:37 EDT 2010
     */
    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    /**
     * This method was generated by Apache iBATIS ibator. This method corresponds to the database table sec_user
     * @ibatorgenerated  Fri May 21 00:34:37 EDT 2010
     */
    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    /**
     * This method was generated by Apache iBATIS ibator. This method corresponds to the database table sec_user
     * @ibatorgenerated  Fri May 21 00:34:37 EDT 2010
     */
    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    /**
     * This method was generated by Apache iBATIS ibator. This method corresponds to the database table sec_user
     * @ibatorgenerated  Fri May 21 00:34:37 EDT 2010
     */
    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    /**
     * This method was generated by Apache iBATIS ibator. This method corresponds to the database table sec_user
     * @ibatorgenerated  Fri May 21 00:34:37 EDT 2010
     */
    public void clear() {
        oredCriteria.clear();
    }

    /**
     * This class was generated by Apache iBATIS ibator. This class corresponds to the database table sec_user
     * @ibatorgenerated  Fri May 21 00:34:37 EDT 2010
     */
    public static class Criteria {
        protected List<String> criteriaWithoutValue;
        protected List<Map<String, Object>> criteriaWithSingleValue;
        protected List<Map<String, Object>> criteriaWithListValue;
        protected List<Map<String, Object>> criteriaWithBetweenValue;

        protected Criteria() {
            super();
            criteriaWithoutValue = new ArrayList<String>();
            criteriaWithSingleValue = new ArrayList<Map<String, Object>>();
            criteriaWithListValue = new ArrayList<Map<String, Object>>();
            criteriaWithBetweenValue = new ArrayList<Map<String, Object>>();
        }

        public boolean isValid() {
            return criteriaWithoutValue.size() > 0
                    || criteriaWithSingleValue.size() > 0
                    || criteriaWithListValue.size() > 0
                    || criteriaWithBetweenValue.size() > 0;
        }

        public List<String> getCriteriaWithoutValue() {
            return criteriaWithoutValue;
        }

        public List<Map<String, Object>> getCriteriaWithSingleValue() {
            return criteriaWithSingleValue;
        }

        public List<Map<String, Object>> getCriteriaWithListValue() {
            return criteriaWithListValue;
        }

        public List<Map<String, Object>> getCriteriaWithBetweenValue() {
            return criteriaWithBetweenValue;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteriaWithoutValue.add(condition);
        }

        protected void addCriterion(String condition, Object value,
                String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property
                        + " cannot be null");
            }
            Map<String, Object> map = new HashMap<String, Object>();
            map.put("condition", condition);
            map.put("value", value);
            criteriaWithSingleValue.add(map);
        }

        protected void addCriterion(String condition,
                List<? extends Object> values, String property) {
            if (values == null || values.size() == 0) {
                throw new RuntimeException("Value list for " + property
                        + " cannot be null or empty");
            }
            Map<String, Object> map = new HashMap<String, Object>();
            map.put("condition", condition);
            map.put("values", values);
            criteriaWithListValue.add(map);
        }

        protected void addCriterion(String condition, Object value1,
                Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property
                        + " cannot be null");
            }
            List<Object> list = new ArrayList<Object>();
            list.add(value1);
            list.add(value2);
            Map<String, Object> map = new HashMap<String, Object>();
            map.put("condition", condition);
            map.put("values", list);
            criteriaWithBetweenValue.add(map);
        }

        public Criteria andUserIdIsNull() {
            addCriterion("USER_ID is null");
            return this;
        }

        public Criteria andUserIdIsNotNull() {
            addCriterion("USER_ID is not null");
            return this;
        }

        public Criteria andUserIdEqualTo(String value) {
            addCriterion("USER_ID =", value, "userId");
            return this;
        }

        public Criteria andUserIdNotEqualTo(String value) {
            addCriterion("USER_ID <>", value, "userId");
            return this;
        }

        public Criteria andUserIdGreaterThan(String value) {
            addCriterion("USER_ID >", value, "userId");
            return this;
        }

        public Criteria andUserIdGreaterThanOrEqualTo(String value) {
            addCriterion("USER_ID >=", value, "userId");
            return this;
        }

        public Criteria andUserIdLessThan(String value) {
            addCriterion("USER_ID <", value, "userId");
            return this;
        }

        public Criteria andUserIdLessThanOrEqualTo(String value) {
            addCriterion("USER_ID <=", value, "userId");
            return this;
        }

        public Criteria andUserIdLike(String value) {
            addCriterion("USER_ID like", value, "userId");
            return this;
        }

        public Criteria andUserIdNotLike(String value) {
            addCriterion("USER_ID not like", value, "userId");
            return this;
        }

        public Criteria andUserIdIn(List<String> values) {
            addCriterion("USER_ID in", values, "userId");
            return this;
        }

        public Criteria andUserIdNotIn(List<String> values) {
            addCriterion("USER_ID not in", values, "userId");
            return this;
        }

        public Criteria andUserIdBetween(String value1, String value2) {
            addCriterion("USER_ID between", value1, value2, "userId");
            return this;
        }

        public Criteria andUserIdNotBetween(String value1, String value2) {
            addCriterion("USER_ID not between", value1, value2, "userId");
            return this;
        }

        public Criteria andCredentialIsNull() {
            addCriterion("CREDENTIAL is null");
            return this;
        }

        public Criteria andCredentialIsNotNull() {
            addCriterion("CREDENTIAL is not null");
            return this;
        }

        public Criteria andCredentialEqualTo(String value) {
            addCriterion("CREDENTIAL =", value, "credential");
            return this;
        }

        public Criteria andCredentialNotEqualTo(String value) {
            addCriterion("CREDENTIAL <>", value, "credential");
            return this;
        }

        public Criteria andCredentialGreaterThan(String value) {
            addCriterion("CREDENTIAL >", value, "credential");
            return this;
        }

        public Criteria andCredentialGreaterThanOrEqualTo(String value) {
            addCriterion("CREDENTIAL >=", value, "credential");
            return this;
        }

        public Criteria andCredentialLessThan(String value) {
            addCriterion("CREDENTIAL <", value, "credential");
            return this;
        }

        public Criteria andCredentialLessThanOrEqualTo(String value) {
            addCriterion("CREDENTIAL <=", value, "credential");
            return this;
        }

        public Criteria andCredentialLike(String value) {
            addCriterion("CREDENTIAL like", value, "credential");
            return this;
        }

        public Criteria andCredentialNotLike(String value) {
            addCriterion("CREDENTIAL not like", value, "credential");
            return this;
        }

        public Criteria andCredentialIn(List<String> values) {
            addCriterion("CREDENTIAL in", values, "credential");
            return this;
        }

        public Criteria andCredentialNotIn(List<String> values) {
            addCriterion("CREDENTIAL not in", values, "credential");
            return this;
        }

        public Criteria andCredentialBetween(String value1, String value2) {
            addCriterion("CREDENTIAL between", value1, value2, "credential");
            return this;
        }

        public Criteria andCredentialNotBetween(String value1, String value2) {
            addCriterion("CREDENTIAL not between", value1, value2, "credential");
            return this;
        }

        public Criteria andLstUptUserIsNull() {
            addCriterion("LST_UPT_USER is null");
            return this;
        }

        public Criteria andLstUptUserIsNotNull() {
            addCriterion("LST_UPT_USER is not null");
            return this;
        }

        public Criteria andLstUptUserEqualTo(String value) {
            addCriterion("LST_UPT_USER =", value, "lstUptUser");
            return this;
        }

        public Criteria andLstUptUserNotEqualTo(String value) {
            addCriterion("LST_UPT_USER <>", value, "lstUptUser");
            return this;
        }

        public Criteria andLstUptUserGreaterThan(String value) {
            addCriterion("LST_UPT_USER >", value, "lstUptUser");
            return this;
        }

        public Criteria andLstUptUserGreaterThanOrEqualTo(String value) {
            addCriterion("LST_UPT_USER >=", value, "lstUptUser");
            return this;
        }

        public Criteria andLstUptUserLessThan(String value) {
            addCriterion("LST_UPT_USER <", value, "lstUptUser");
            return this;
        }

        public Criteria andLstUptUserLessThanOrEqualTo(String value) {
            addCriterion("LST_UPT_USER <=", value, "lstUptUser");
            return this;
        }

        public Criteria andLstUptUserLike(String value) {
            addCriterion("LST_UPT_USER like", value, "lstUptUser");
            return this;
        }

        public Criteria andLstUptUserNotLike(String value) {
            addCriterion("LST_UPT_USER not like", value, "lstUptUser");
            return this;
        }

        public Criteria andLstUptUserIn(List<String> values) {
            addCriterion("LST_UPT_USER in", values, "lstUptUser");
            return this;
        }

        public Criteria andLstUptUserNotIn(List<String> values) {
            addCriterion("LST_UPT_USER not in", values, "lstUptUser");
            return this;
        }

        public Criteria andLstUptUserBetween(String value1, String value2) {
            addCriterion("LST_UPT_USER between", value1, value2, "lstUptUser");
            return this;
        }

        public Criteria andLstUptUserNotBetween(String value1, String value2) {
            addCriterion("LST_UPT_USER not between", value1, value2,
                    "lstUptUser");
            return this;
        }

        public Criteria andLstUptTimeIsNull() {
            addCriterion("LST_UPT_TIME is null");
            return this;
        }

        public Criteria andLstUptTimeIsNotNull() {
            addCriterion("LST_UPT_TIME is not null");
            return this;
        }

        public Criteria andLstUptTimeEqualTo(Date value) {
            addCriterion("LST_UPT_TIME =", value, "lstUptTime");
            return this;
        }

        public Criteria andLstUptTimeNotEqualTo(Date value) {
            addCriterion("LST_UPT_TIME <>", value, "lstUptTime");
            return this;
        }

        public Criteria andLstUptTimeGreaterThan(Date value) {
            addCriterion("LST_UPT_TIME >", value, "lstUptTime");
            return this;
        }

        public Criteria andLstUptTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("LST_UPT_TIME >=", value, "lstUptTime");
            return this;
        }

        public Criteria andLstUptTimeLessThan(Date value) {
            addCriterion("LST_UPT_TIME <", value, "lstUptTime");
            return this;
        }

        public Criteria andLstUptTimeLessThanOrEqualTo(Date value) {
            addCriterion("LST_UPT_TIME <=", value, "lstUptTime");
            return this;
        }

        public Criteria andLstUptTimeIn(List<Date> values) {
            addCriterion("LST_UPT_TIME in", values, "lstUptTime");
            return this;
        }

        public Criteria andLstUptTimeNotIn(List<Date> values) {
            addCriterion("LST_UPT_TIME not in", values, "lstUptTime");
            return this;
        }

        public Criteria andLstUptTimeBetween(Date value1, Date value2) {
            addCriterion("LST_UPT_TIME between", value1, value2, "lstUptTime");
            return this;
        }

        public Criteria andLstUptTimeNotBetween(Date value1, Date value2) {
            addCriterion("LST_UPT_TIME not between", value1, value2,
                    "lstUptTime");
            return this;
        }
    }
}